import { IFeidaoAiBrowserComponent } from '@dfeidao/atom-web/interfaces';
import set_node_cls from "@dfeidao/atom-web/ui/set-node-cls";
import set from '@dfeidao/atom-web/local/set';

import nodejs from '@dfeidao/atom-web/msg/nodejs';
import render from '@dfeidao/atom-web/render/render';
import p002 from './p002';
import p003 from './p003';
import p001 from './p001';

export default async function a001(fd: IFeidaoAiBrowserComponent, val: { ne: string }) {


	const no = val.ne as string;

	set(fd, 'no', no);

	console.log("右侧添加===》", no);

	console.log("右侧添加++》", val);
	render(fd, val, p002, 'p002', 'inner');

	const res = await nodejs<{ res: Array<{}>; c: number; }>('risk_point/zj-000003/s001', { risk_po_type_no: no });

	console.log("youwuzhi真的加大对....", res);

	render(fd, val, p003, 'p003', 'inner');
	render(fd, '', p001, 'p001', 'inner');

	// 显示右侧添加弹出框
	const d = fd.data.node.querySelector<HTMLDivElement>('[data-name="yadd"]');
	set_node_cls(d, 'display-n', false);
}
